# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-padacioso
pkgver=0.2.0
pkgrel=1
pkgdesc="Dead simple regex based intent parser"
url="https://github.com/OpenJarbas/padacioso"
arch="noarch"
license="Apache-2.0"
depends="py3-simplematch"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/OpenJarbas/padacioso/archive/refs/tags/V$pkgver.tar.gz"
builddir="$srcdir/padacioso-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
bfb8758a1835c19e6d625d98f140bde2beacab4c5098d3ec5946d66f950582f2ab3fff90d4953bd0b13dd5f53fa12857b020b9da033f45b15cf6d59c256f5149  py3-padacioso-0.2.0.tar.gz
"
